<script type="text/javascript">
var content = null;
$(function () {
	if(CKEDITOR.instances['content']) 
		CKEDITOR.remove(CKEDITOR.instances['content']);
	var uploadParm = {
		height:'150px',
		filebrowserBrowseUrl:'${contextPath}browse-file.html',
		filebrowserImageBrowseUrl:'${contextPath}browse-image.html',
		filebrowserUploadUrl:'${contextPath}m/parkannouncement-upload.html?type=file',
		filebrowserImageUploadUrl:'${contextPath}m/parkannouncement-upload.html?type=image',
		language:'zh-cn',
	}
	content = CKEDITOR.replace('content', uploadParm);
	addFilesUploadEvent_PolicySupport();
});
</script>
<#import "/freemarker/datetime.ftl" as dt>
<div class="widget" style="float:left; width:720px;">
	<div class="widget-header">
		<h3 class="title"><i class="fontello-icon-th-list-1"></i> 政策支持编辑</h3>
	</div>
	<div class="widget-content">
		<form id="editPolicySupportForm">
			<input type="hidden" name="rec" value="${(pa.code)!''}" />
			<input type="hidden" id="uploadFilesBtn"/>
			<table class="table boo-table table-content" style="width:100%; text-align:left;">
				<tr>
					<td class="table-left" style="width:100px;">类型</td>
					<td>
						<select name="type" id="type" >
							<option value="1" <#if ps?? && (ps.type=="1") >selected="selected"</#if>>优惠政策</option>
							<option value="2" <#if ps?? && (ps.type=="2") >selected="selected"</#if>>招商信息</option>
							<option value="3" <#if ps?? && (ps.type=="3") >selected="selected"</#if>>申报项目</option>
						</select>
					<td>
				</tr>
				<tr>
					<td class="table-left" style="width:100px;">标题</td>
					<td><input type="text" id="title" name="title" style="width:600px;" value="${(ps.title)!''}" />
						<input type="hidden" id="code" name="code" value="${(ps.code)!''}" /></td>
				</tr>
				<tr>
					<td class="table-left" style="width:100px;">发布单位</td>
					<td><input type="text" id="unit" name="unit" style="width:600px;" value="${(ps.unit)!''}" />
				</tr
				<tr>
					<td class="table-left" style="width:100px;">发布时间</td>
					<td>
						<#if ps??>
							<@dt.dateTime name="rt" value=ps.rt width="150px"/>
						<#else>
							<@dt.dateTime name="rt"  width="130px"/>
						</#if>	
					</td>
				</tr>
				<tr>
					<td class="table-left">内容</td>
					<td><textarea id="content" style="width:600px;">${(ps.content)!''}</textarea></td>
				</tr>
				<tr>
					<td class="table-left">附件<a id="uploadFilesBtn1" href="javascript:;" >[选择]</a></td>
					<td id="annexListTable">
						<#if list??>
							<#list list as psa>
								<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
									<input type="hidden" name="list[${psa_index}].code" value="${psa.code}" />
									<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
									<a class="title" target="_blank" href="${contextPath}upload/policySupportPhotoAnnex/${psa.sn}.${psa.ext}">${psa.name}</a>
								</div>
							</#list>
						</#if>
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align:center;">
						<a href="javascript:;" class="btn btn-info" onclick="javascript:checkedPolicySupport();">
							<i class="fontello-icon-mail-4"></i>&nbsp;保&nbsp;&nbsp;存
						</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<a href="javascript:;" class="btn btn-info" onclick="javascript:sys_load_handle('policysupport');">
							<i class="fontello-icon-block"></i>&nbsp;取&nbsp;&nbsp;消
						</a>
					</td>
				</tr>
			</table>
		</form>
	</div>
</div>



<div id="tempAnnexListDiv" style="display:none;">
	<div class="filter-table rep" style="margin-left:5px; margin-bottom:0px;">
		<input class="name" type="hidden" />
		<input class="size" type="hidden" />
		<input class="sn" type="hidden"  />
		<input class="ext" type="hidden"  />
		<input class="afcs" type="hidden" name="afcs"  />
		<button type="button" class="close" data-dismiss="alert" onclick="javascript:deleteSelectedItem($(this));">&times;</button>
		<a class="title" href="#"></a>
	</div>
</div>
<input type="hidden" id="workguidedetail_an_index" value="${(list?size)!'0'}" />